﻿@using System.Text.RegularExpressions
@model Easy.CMS.Product.ViewModel.ProductListWidgetViewModel

<div class="widget ProductList container-fluid">
    <div class="row">
        @foreach (var item in Model.Products)
        {
            <div class="@Model.Columns">
                <div class="thumbnail colChild">
                    <img alt="@item.Title" title="@item.Title" src="@item.ImageThumbUrl" />
                    <div class="caption">
                        <h4>
                            <a href="@(item.Url.IsNullOrEmpty() && !Model.DetailPageUrl.IsNullOrEmpty() ? Url.Content(Model.DetailPageUrl) + "?id=" + item.ID : item.Url)" target="_blank">
                                @item.Title
                            </a>
                        </h4>
                        <p>
                            @item.Description
                        </p>
                    </div>
                </div>
            </div>
        }
        <div class="clearfix"></div>
    </div>
    
    @if (Model.IsPageable)
    {
        Html.RenderPartial("Partial_Pagination", Model.Page);
    }
</div>



